/**
* 系统管理 用户管理
*/
<template>
  <div>
    <!-- 面包屑导航 -->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: 'taskList' }">任务管理</el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: 'getResults?id='+this.$route.query.id+'&sourceType='+this.$route.query.sourceType }">执行结果</el-breadcrumb-item>
      <el-breadcrumb-item>执行结果详情</el-breadcrumb-item>
    </el-breadcrumb>
    <div style="padding:5px;color:#000000;text-align: center;font-family:PingFang SC;font-size:30px">执行结果详情</div>


   <div style="padding:10px">
     <span style="background-color:#409EFF;border-radius: 4px;color: white;font-size:20px">请求内容</span>
     <el-input
       type="textarea"
       :rows="15"
       v-model="fileContent">
     </el-input>
   </div>

    <div style="padding:7px">
      <span style="background-color:#409EFF;border-radius: 4px;color: white;font-size:20px">结果详情</span>
      <el-input
        type="textarea"
        :rows="4"
        v-model="result">
      </el-input>
    </div>



  </div>
</template>

<script>
  // 导入请求方法
  import {
    userList,
    userSave,
    userDelete,
    userPwd,
    userExpireToken,
    userFlashCache,
    userLock,
    UserDeptTree,
    UserDeptSave,
    UserDeptdeptTree,
    UserChangeDept
  } from '../../api/userMG'
  import Pagination from '../../components/Pagination'
  import axios from "axios";
  export default {
    data() {
      return {
        loading: false, //是显示加载


        obj:[{id:'',taskName:""}],

        // 请求数据参数
        formInline: {
          page: 1,
          id:this.$route.query.id,
          resultId:this.$route.query.resultId,
          limit: 10,
          source_id: '',
          sourceType:this.$route.query.sourceType
        },
        //结果数据
        result:"",
        //任务数据
        taskData:[],
        // 数据源信息
        modelDataSource1:[],

        // 文件内容
        fileContent:"",
        ll:[],
        //错误消息
        error:[],
        // 分页参数
        pageparm: {
          currentPage: 1,
          pageSize: 10,
          total: 10
        }
      }
    },
    // 注册组件
    components: {
      Pagination
    },

    /**
     * 数据发生改变
     */
    watch: {},

    /**
     * 创建完毕
     */
    created() {
      this.getSearchPage()

    },

    /**
     * 里面的方法只有被调用才会执行
     */
    methods: {
      back(){
        this.$router.back()
      },
      getSearchPage() {
        this.logining = true
        let url = this.$global.javaUrl+"/task/resultPageDetail"
        let config = {
          headers:
            {
              //'Content-Type':'application/json',
              'user' : localStorage.getItem('userId')
            },
          params: {
            resultId:this.formInline.resultId,
            taskId:this.formInline.id
            //isLock: this.formInline.isLock
          }
        }

        axios.get(url, config).then(response=>{
         //console.log(this.this.formInline.resultId)
            if(this.$route.query.resultId ==response.data.data.resultId){
              this.fileContent = response.data.data.sourceContent
              this.result = response.data.data.result
            }
        })
      },
      // 分页插件事件
      callFather(parm) {
        this.formInline.page = parm.currentPage
        this.formInline.limit = parm.pageSize
        this.getdata(this.formInline)
      },

    }
  }
</script>

<style scoped>
  .user-search {
    margin-top: 20px;
  }
  .userRole {
    width: 100%;
  }
</style>

